import request from '@/utils/request'

export function getStaff(params) {
  return request({
    url: '/sys/user',
    method: 'get',
    params
  })
}
export function setStaffList(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}
export function add(data) {
  return request({
    url: '/sys/user',
    method: 'post',
    data
  })
}
export function getPersonalDetail(id) {
  return request({
    url: `/employees/${id}/personalInfo`,
    method: 'get'
  })
}
export function updatePersonal(data) {
  return request({
    url: `/employees/${data.id}/personalInfo`,
    method: 'put',
    data
  })
}
export function staffInfo(id) {
  return request({
    url: `/sys/user/${id}`,
    method: 'get'
  })
}
export function putStaff(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put',
    data
  })
}
